package com.chixing.day07_abstract.prototype;

public class ProductTest {
    public static void main(String[] args) throws CloneNotSupportedException {
        Product product =  new Product();
        product.setProId(101);
        product.setProName("今麦郎矿泉水");
        product.setProPrice(1.9f);

        Object cloneObj = product.clone(); // new , 101,"今麦郎矿泉水", 1.9f


        // 创建一个Company对象, 克隆一个Company 对象
        Company company =   new Company(901,"苏州微软","外企","苏州",136628939999L);
        Company comClone =company.clone();


        // 创建一个Job对象， 克隆一个 Job 对象
        Job job = new Job(801,company,"Java开发工程师",5000,8000,"本科","上海");
        Object  jobClone =  job.clone();
        System.out.println("原始对象：" + job);
        System.out.println("克隆对象：" + jobClone);
    }
}
